#include<bits/stdc++.h>
using namespace std;
int main()
{
	int x;
	cin>>x;
	if(x%2==0&&4<x&&x<=100) cout<<"1 ";
	else cout<<"0 ";
	if(x%2==0||(4<x&&x<=100)) cout<<"1 ";
	else cout<<"0 ";
	if((x%2==0&&!(4<x&&x<=100))||(x%2!=0&&(4<x&&x<=100)))
	cout<<"1 "; 
	else cout<<"0 ";
	if(x%2!=0&&!(4<x&&x<=100)) cout<<"1 ";
	else cout<<"0 ";
    return 0;
}

